package com.jiyun.user.controller;
import com.jiyun.user.domain.User;
import com.jiyun.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    //      登录
    @RequestMapping("/getUser")
    public User getUser(User user)
    {
        return userService.getUser(user);
    }
    //      添加用户
    @RequestMapping("/addUser")
    public void addUser(User user)
    {
        userService.addUser(user);
    }
}
